/**
 * json配置举例，更多配置请看 IConfigSchema
 * @author luguoxiang
 * @date 2022/7/5
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
import { getDict, IConfigSchema, LgAutoComplete } from '@/soar';
import api from '@/pages/general/dict/api';

const fieldList: IConfigSchema<any>[] = [
  {
    field: 'orgId',
    label: '所属组织',
    dataType: 'string',
    search: false,
    table: {
      colKey: 'orgIdName',
    },
    detail: {
      field: 'orgIdName',
    },
    form: {
      rules: true, // true方式配置校验，必填
      slots: 'orgId',
    },
  },
  {
    field: 'name',
    label: '名称',
    dataType: 'string',
    form: {
      rules: true, // true方式配置校验，必填
      component: LgAutoComplete,
      componentProps: {
        options: () => getDict('PostNameEnum'),
        valueField: 'label',
      },
    },
  },
  {
    field: 'alias',
    label: '别名(简称)',
    dataType: 'string',
  },
  {
    field: 'remark',
    label: '备注',
    dataType: 'string',
    form: {
      component: 't-textarea',
    },
  },
];

export default fieldList;
